scalebutton: Invert smooth scroll dy when adding to the current value
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 18 Sep 2014 11:48:35 +0000 (13:48 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 23 Sep 2014 00:28:27 +0000 (20:28 -0400)
On regular scrolling (ie. not natural scrolling), positive deltas in the
Y axis (downwards) should actually move the value towards the adjustment
minimum value to be more intuitive. This also makes the scrolling
directions match between the button and the popped up scale.

https://bugzilla.gnome.org/show_bug.cgi?id=736830

gtk/gtkscalebutton.c

index 24976b0accf93ae6b34f63bec2d1138970e52062..f797399fa498758f3ef5faca308a5c4a4e91aba7 100644 (file)
@@ -794,7 +794,7 @@ gtk_scale_button_scroll (GtkWidget      *widget,
     }
   else if (event->direction == GDK_SCROLL_SMOOTH)
     {
-      d += event->delta_y * gtk_adjustment_get_step_increment (adjustment);
+      d -= event->delta_y * gtk_adjustment_get_step_increment (adjustment);
       d = CLAMP (d, gtk_adjustment_get_lower (adjustment),
                  gtk_adjustment_get_upper (adjustment));
     }